package main

import (
	"fmt"
	"net"
	"time"
)

func main() {
	s, err := net.Listen("tcp4", "0.0.0.0:7675")
	if err != nil {
		panic(err)
	}
	for {
		conn, err := s.Accept()
		if err != nil {
			panic(err)
		}
		go handleConn(conn)
	}
}

func handleConn(conn net.Conn) {
	for {
		time.Sleep(time.Second * 5)
		_, err := conn.Write([]byte(fmt.Sprintf("当前时间: %v, \r\n", time.Now())))
		if err != nil {
			fmt.Println(err)
			retu
		}

	}

}
